﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Com.Charence.PassManager.Common;

namespace Com.Charence.PassManager.UI.Web.Models.Dashboard
{
    public class AccountSummaryModel
    {
        public int AccountID { get; set; }

        public string WebSiteName { get; set; }

        public string AccountName { get; set; }

        public bool IsPinSet { get; set; }

        public int? SecureQuestions { get; set; }

        public int? OtherProperties { get; set; }

        public string IsPinSetHolderClass
        {
            get {
                return IsPinSet ? Constants.PanelClass.Success : Constants.PanelClass.Failed;
            }
        }

        public string IsPinSetIconClass
        {
            get {
                return IsPinSet ? Constants.IconClass.Correct : Constants.IconClass.Incorrect;
            }
        }

        public bool ShowOtherProperties
        {
            get {
                return OtherProperties.HasValue && OtherProperties.Value > 0;
            }
        }

        public string SecureQuestionValue
        {
            get
            {
                if (SecureQuestions.HasValue && SecureQuestions.Value > 0)
                    return SecureQuestions.Value.ToString();
                return Constants.Values.NotSet;
            }
        }
    }
}